package com.foocus.foocuscloud.common.api.rpc;

import com.foocus.foocuscloud.common.api.constant.FoocusCloudCommonConstant;
import com.foocus.foocuscloud.common.api.dto.LogRecordDTO;
import com.foocus.foocuscloud.common.domain.ResponseWrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(FoocusCloudCommonConstant.FOOCUSCLOUD_PROVIDER_APPLY_ID)
public interface RpcRestService {

    String LOG_PATH_PREFIX = "/api/log/";

    @PostMapping(LOG_PATH_PREFIX + "add/logWrapper")
    ResponseWrapper addLogWrapper(@RequestBody LogRecordDTO record);

    @GetMapping(LOG_PATH_PREFIX + "wrapper2")
    ResponseWrapper getLogWrapper2(@RequestParam(value = "id") String id);
}
